n=eval(input())
sum=1
for i in range(0,n+1):
    print("pow(3,%d) ="%i,sum)
    sum*=3